package com.mobibom.pipelines;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;


import android.content.ContentValues;
import android.database.Cursor;
import android.database.SQLException;
import android.util.Log;
 
public class DatabaseHelper
{
	// the Activity or Application that is creating an object from this class.
	Context context;
 
	// a reference to the database used by this application/object
	private SQLiteDatabase db;
 
	// databse naam veranderen tijdens het testen anders pakt de emulator hem neit
	private final String DB_NAME = "pipelines";
	private final int DB_VERSION = 1;
 
	public int AANTALLEVELS = 52;
	public int AANTALPACKS = 1;
	//TABLE LEVELPACKS
	private final String TABLE_LEVELPACKS = "levelpacks";
	private final String LEVELPACK_ID = "id";
	private final String LEVELPACK_NAAM = "naam";
	private final String LEVELPACK_PLAATJE = "plaatje";
	
	// TABLE LEVELS
	private final String TABLE_LEVELS = "levels";
	private final String LEVEL_ID = "id";
	private final String LEVEL_NR = "naam";
	private final String LEVEL_PACK = "level_pack";
	private final String LEVEL_PLAATJE = "plaatje";
	private final String LEVEL_TOPSCORE_SEC = "topscore_sec";
	private final String LEVEL_TOPSCORE_KLIKS = "topscore_kliks";
	
	private final String LEVEL_11 = "level11";
	private final String LEVEL_12 = "level12";
	private final String LEVEL_13 = "level13";
	private final String LEVEL_14 = "level14";
	private final String LEVEL_15 = "level15";
	private final String LEVEL_16 = "level16";
	private final String LEVEL_17 = "level17";
	private final String LEVEL_18 = "level18";
	
	private final String LEVEL_21 = "level21";
	private final String LEVEL_22 = "level22";
	private final String LEVEL_23 = "level23";
	private final String LEVEL_24 = "level24";
	private final String LEVEL_25 = "level25";
	private final String LEVEL_26 = "level26";
	private final String LEVEL_27 = "level27";
	private final String LEVEL_28 = "level28";
	
	private final String LEVEL_31 = "level31";
	private final String LEVEL_32 = "level32";
	private final String LEVEL_33 = "level33";
	private final String LEVEL_34 = "level34";
	private final String LEVEL_35 = "level35";
	private final String LEVEL_36 = "level36";
	private final String LEVEL_37 = "level37";
	private final String LEVEL_38 = "level38";
	
	private final String LEVEL_41 = "level41";
	private final String LEVEL_42 = "level42";
	private final String LEVEL_43 = "level43";
	private final String LEVEL_44 = "level44";
	private final String LEVEL_45 = "level45";
	private final String LEVEL_46 = "level46";
	private final String LEVEL_47 = "level47";
	private final String LEVEL_48 = "level48";
	
	private final String LEVEL_51 = "level51";
	private final String LEVEL_52 = "level52";
	private final String LEVEL_53 = "level53";
	private final String LEVEL_54 = "level54";
	private final String LEVEL_55 = "level55";
	private final String LEVEL_56 = "level56"; 
	private final String LEVEL_57 = "level57";
	private final String LEVEL_58 = "level58";
	
	private final String LEVEL_61 = "level61";
	private final String LEVEL_62 = "level62";
	private final String LEVEL_63 = "level63";
	private final String LEVEL_64 = "level64";
	private final String LEVEL_65 = "level65";
	private final String LEVEL_66 = "level66";
	private final String LEVEL_67 = "level67";
	private final String LEVEL_68 = "level68";
	
	private final String LEVEL_71 = "level71";
	private final String LEVEL_72 = "level72";
	private final String LEVEL_73 = "level73";
	private final String LEVEL_74 = "level74";
	private final String LEVEL_75 = "level75";
	private final String LEVEL_76 = "level76";
	private final String LEVEL_77 = "level77";
	private final String LEVEL_78 = "level78";
	
	private final String LEVEL_81 = "level81";
	private final String LEVEL_82 = "level82";
	private final String LEVEL_83 = "level83";
	private final String LEVEL_84 = "level84";
	private final String LEVEL_85 = "level85";
	private final String LEVEL_86 = "level86";
	private final String LEVEL_87 = "level87";
	private final String LEVEL_88 = "level88";
	
	private final String LEVEL_91 = "level91";
	private final String LEVEL_92 = "level92";
	private final String LEVEL_93 = "level93";
	private final String LEVEL_94 = "level94";
	private final String LEVEL_95 = "level95";
	private final String LEVEL_96 = "level96";
	private final String LEVEL_97 = "level97";
	private final String LEVEL_98 = "level98";
	
	private final String LEVEL_101 = "level101";
	private final String LEVEL_102 = "level102";
	private final String LEVEL_103 = "level103";
	private final String LEVEL_104 = "level104";
	private final String LEVEL_105 = "level105";
	private final String LEVEL_106 = "level106";
	private final String LEVEL_107 = "level107";
	private final String LEVEL_108 = "level108";
	
	private final String LEVEL_ROTATE_11 = "levelrotate11";
	private final String LEVEL_ROTATE_12 = "levelrotate12";
	private final String LEVEL_ROTATE_13 = "levelrotate13";
	private final String LEVEL_ROTATE_14 = "levelrotate14";
	private final String LEVEL_ROTATE_15 = "levelrotate15";
	private final String LEVEL_ROTATE_16 = "levelrotate16";
	private final String LEVEL_ROTATE_17 = "levelrotate17";
	private final String LEVEL_ROTATE_18 = "levelrotate18";
	
	private final String LEVEL_ROTATE_21 = "levelrotate21";
	private final String LEVEL_ROTATE_22 = "levelrotate22";
	private final String LEVEL_ROTATE_23 = "levelrotate23";
	private final String LEVEL_ROTATE_24 = "levelrotate24";
	private final String LEVEL_ROTATE_25 = "levelrotate25";
	private final String LEVEL_ROTATE_26 = "levelrotate26";
	private final String LEVEL_ROTATE_27 = "levelrotate27";
	private final String LEVEL_ROTATE_28 = "levelrotate28";
	
	private final String LEVEL_ROTATE_31 = "levelrotate31";
	private final String LEVEL_ROTATE_32 = "levelrotate32";
	private final String LEVEL_ROTATE_33 = "levelrotate33";
	private final String LEVEL_ROTATE_34 = "levelrotate34";
	private final String LEVEL_ROTATE_35 = "levelrotate35";
	private final String LEVEL_ROTATE_36 = "levelrotate36";
	private final String LEVEL_ROTATE_37 = "levelrotate37";
	private final String LEVEL_ROTATE_38 = "levelrotate38";
	
	private final String LEVEL_ROTATE_41 = "levelrotate41";
	private final String LEVEL_ROTATE_42 = "levelrotate42";
	private final String LEVEL_ROTATE_43 = "levelrotate43";
	private final String LEVEL_ROTATE_44 = "levelrotate44";
	private final String LEVEL_ROTATE_45 = "levelrotate45";
	private final String LEVEL_ROTATE_46 = "levelrotate46";
	private final String LEVEL_ROTATE_47 = "levelrotate47";
	private final String LEVEL_ROTATE_48 = "levelrotate48";
	
	private final String LEVEL_ROTATE_51 = "levelrotate51";
	private final String LEVEL_ROTATE_52 = "levelrotate52";
	private final String LEVEL_ROTATE_53 = "levelrotate53";
	private final String LEVEL_ROTATE_54 = "levelrotate54";
	private final String LEVEL_ROTATE_55 = "levelrotate55";
	private final String LEVEL_ROTATE_56 = "levelrotate56";
	private final String LEVEL_ROTATE_57 = "levelrotate57";
	private final String LEVEL_ROTATE_58 = "levelrotate58";
	
	private final String LEVEL_ROTATE_61 = "levelrotate61";
	private final String LEVEL_ROTATE_62 = "levelrotate62";
	private final String LEVEL_ROTATE_63 = "levelrotate63";
	private final String LEVEL_ROTATE_64 = "levelrotate64";
	private final String LEVEL_ROTATE_65 = "levelrotate65";
	private final String LEVEL_ROTATE_66 = "levelrotate66";
	private final String LEVEL_ROTATE_67 = "levelrotate67";
	private final String LEVEL_ROTATE_68 = "levelrotate68";
	
	private final String LEVEL_ROTATE_71 = "levelrotate71";
	private final String LEVEL_ROTATE_72 = "levelrotate72";
	private final String LEVEL_ROTATE_73 = "levelrotate73";
	private final String LEVEL_ROTATE_74 = "levelrotate74";
	private final String LEVEL_ROTATE_75 = "levelrotate75";
	private final String LEVEL_ROTATE_76 = "levelrotate76";
	private final String LEVEL_ROTATE_77 = "levelrotate77";
	private final String LEVEL_ROTATE_78 = "levelrotate78";
	
	private final String LEVEL_ROTATE_81 = "levelrotate81";
	private final String LEVEL_ROTATE_82 = "levelrotate82";
	private final String LEVEL_ROTATE_83 = "levelrotate83";
	private final String LEVEL_ROTATE_84 = "levelrotate84";
	private final String LEVEL_ROTATE_85 = "levelrotate85";
	private final String LEVEL_ROTATE_86 = "levelrotate86";
	private final String LEVEL_ROTATE_87 = "levelrotate87";
	private final String LEVEL_ROTATE_88 = "levelrotate88";
	
	private final String LEVEL_ROTATE_91 = "levelrotate91";
	private final String LEVEL_ROTATE_92 = "levelrotate92";
	private final String LEVEL_ROTATE_93 = "levelrotate93";
	private final String LEVEL_ROTATE_94 = "levelrotate94";
	private final String LEVEL_ROTATE_95 = "levelrotate95";
	private final String LEVEL_ROTATE_96 = "levelrotate96";
	private final String LEVEL_ROTATE_97 = "levelrotate97";
	private final String LEVEL_ROTATE_98 = "levelrotate98";
	
	private final String LEVEL_ROTATE_101 = "levelrotate101";
	private final String LEVEL_ROTATE_102 = "levelrotate102";
	private final String LEVEL_ROTATE_103 = "levelrotate103";
	private final String LEVEL_ROTATE_104 = "levelrotate104";
	private final String LEVEL_ROTATE_105 = "levelrotate105";
	private final String LEVEL_ROTATE_106 = "levelrotate106";
	private final String LEVEL_ROTATE_107 = "levelrotate107";
	private final String LEVEL_ROTATE_108 = "levelrotate108";	
	
	
	public DatabaseHelper(Context context)
	{
		this.context = context;
		// create or open the database
		CustomSQLiteOpenHelper helper = new CustomSQLiteOpenHelper(context);
		this.db = helper.getWritableDatabase();
	}
 
	/**********************************************************************
	 * ADDING A ROW TO THE DATABASE TABLE
	 */
	public void addLevelPack(String naam, String plaatje){
		// this is a key value pair holder used by android's SQLite functions
		ContentValues values = new ContentValues();
		values.put(LEVELPACK_NAAM, naam);
		values.put(LEVELPACK_PLAATJE, plaatje);
		// ask the database object to insert the new data 
		try{db.insert(TABLE_LEVELPACKS, null, values);
		}
		catch(Exception e)
		{
			Log.e("DB ERROR addlevelpacks:", e.toString());
			e.printStackTrace();
		}
	}
	
	public void addLevel(int levelpack, String levelnr, String plaatje,
							int vak11, int vak12, int vak13, int vak14, int vak15, int vak16, int vak17, int vak18,
							int vak21, int vak22, int vak23, int vak24, int vak25, int vak26, int vak27, int vak28,
							int vak31, int vak32, int vak33, int vak34, int vak35, int vak36, int vak37, int vak38,
							int vak41, int vak42, int vak43, int vak44, int vak45, int vak46, int vak47, int vak48,
							int vak51, int vak52, int vak53, int vak54, int vak55, int vak56, int vak57, int vak58,
							int vak61, int vak62, int vak63, int vak64, int vak65, int vak66, int vak67, int vak68,
							int vak71, int vak72, int vak73, int vak74, int vak75, int vak76, int vak77, int vak78,
							int vak81, int vak82, int vak83, int vak84, int vak85, int vak86, int vak87, int vak88,
							int vak91, int vak92, int vak93, int vak94, int vak95, int vak96, int vak97, int vak98,
							int vak101, int vak102, int vak103, int vak104, int vak105, int vak106, int vak107, int vak108,
							
							int rotate11, int rotate12, int rotate13, int rotate14, int rotate15, int rotate16, int rotate17, int rotate18,
							int rotate21, int rotate22, int rotate23, int rotate24, int rotate25, int rotate26, int rotate27, int rotate28,
							int rotate31, int rotate32, int rotate33, int rotate34, int rotate35, int rotate36, int rotate37, int rotate38,
							int rotate41, int rotate42, int rotate43, int rotate44, int rotate45, int rotate46, int rotate47, int rotate48,
							int rotate51, int rotate52, int rotate53, int rotate54, int rotate55, int rotate56, int rotate57, int rotate58,
							int rotate61, int rotate62, int rotate63, int rotate64, int rotate65, int rotate66, int rotate67, int rotate68,
							int rotate71, int rotate72, int rotate73, int rotate74, int rotate75, int rotate76, int rotate77, int rotate78,
							int rotate81, int rotate82, int rotate83, int rotate84, int rotate85, int rotate86, int rotate87, int rotate88,
							int rotate91, int rotate92, int rotate93, int rotate94, int rotate95, int rotate96, int rotate97, int rotate98,
							int rotate101, int rotate102, int rotate103, int rotate104, int rotate105, int rotate106, int rotate107, int rotate108
							)
	{
		// this is a key value pair holder used by android's SQLite functions
		ContentValues values = new ContentValues();
		values.put(LEVEL_NR, levelnr);
		values.put(LEVEL_PACK, levelpack);
		values.put(LEVEL_PLAATJE, plaatje);
		values.put(LEVEL_TOPSCORE_KLIKS, 0);
		values.put(LEVEL_TOPSCORE_SEC, 0);
		
		values.put(LEVEL_11, vak11);
		values.put(LEVEL_12, vak12);
		values.put(LEVEL_13, vak13);
		values.put(LEVEL_14, vak14);
		values.put(LEVEL_15, vak15);
		values.put(LEVEL_16, vak16);
		values.put(LEVEL_17, vak17);
		values.put(LEVEL_18, vak18);
		
		values.put(LEVEL_21, vak21);
		values.put(LEVEL_22, vak22);
		values.put(LEVEL_23, vak23);
		values.put(LEVEL_24, vak24);
		values.put(LEVEL_25, vak25);
		values.put(LEVEL_26, vak26);
		values.put(LEVEL_27, vak27);
		values.put(LEVEL_28, vak28);
		
		values.put(LEVEL_31, vak31);
		values.put(LEVEL_32, vak32);
		values.put(LEVEL_33, vak33);
		values.put(LEVEL_34, vak34);
		values.put(LEVEL_35, vak35);
		values.put(LEVEL_36, vak36);
		values.put(LEVEL_37, vak37);
		values.put(LEVEL_38, vak38);
		
		values.put(LEVEL_41, vak41);
		values.put(LEVEL_42, vak42);
		values.put(LEVEL_43, vak43);
		values.put(LEVEL_44, vak44);
		values.put(LEVEL_45, vak45);
		values.put(LEVEL_46, vak46);
		values.put(LEVEL_47, vak47);
		values.put(LEVEL_48, vak48);
		
		values.put(LEVEL_51, vak51);
		values.put(LEVEL_52, vak52);
		values.put(LEVEL_53, vak53);
		values.put(LEVEL_54, vak54);
		values.put(LEVEL_55, vak55);
		values.put(LEVEL_56, vak56);
		values.put(LEVEL_57, vak57);
		values.put(LEVEL_58, vak58);
		
		values.put(LEVEL_61, vak61);
		values.put(LEVEL_62, vak62);
		values.put(LEVEL_63, vak63);
		values.put(LEVEL_64, vak64);
		values.put(LEVEL_65, vak65);
		values.put(LEVEL_66, vak66);
		values.put(LEVEL_67, vak67);
		values.put(LEVEL_68, vak68);
		
		values.put(LEVEL_71, vak71);
		values.put(LEVEL_72, vak72);
		values.put(LEVEL_73, vak73);
		values.put(LEVEL_74, vak74);
		values.put(LEVEL_75, vak75);
		values.put(LEVEL_76, vak76);
		values.put(LEVEL_77, vak77);
		values.put(LEVEL_78, vak78);
		
		values.put(LEVEL_81, vak81);
		values.put(LEVEL_82, vak82);
		values.put(LEVEL_83, vak83);
		values.put(LEVEL_84, vak84);
		values.put(LEVEL_85, vak85);
		values.put(LEVEL_86, vak86);
		values.put(LEVEL_87, vak87);
		values.put(LEVEL_88, vak88);
		
		values.put(LEVEL_91, vak91);
		values.put(LEVEL_92, vak92);
		values.put(LEVEL_93, vak93);
		values.put(LEVEL_94, vak94);
		values.put(LEVEL_95, vak95);
		values.put(LEVEL_96, vak96);
		values.put(LEVEL_97, vak97);
		values.put(LEVEL_98, vak98);
		
		values.put(LEVEL_101, vak101);
		values.put(LEVEL_102, vak102);
		values.put(LEVEL_103, vak103);
		values.put(LEVEL_104, vak104);
		values.put(LEVEL_105, vak105);
		values.put(LEVEL_106, vak106);
		values.put(LEVEL_107, vak107);
		values.put(LEVEL_108, vak108);
		
		values.put(LEVEL_ROTATE_11, rotate11);
		values.put(LEVEL_ROTATE_12, rotate12);
		values.put(LEVEL_ROTATE_13, rotate13);
		values.put(LEVEL_ROTATE_14, rotate14);
		values.put(LEVEL_ROTATE_15, rotate15);
		values.put(LEVEL_ROTATE_16, rotate16);
		values.put(LEVEL_ROTATE_17, rotate17);
		values.put(LEVEL_ROTATE_18, rotate18);
		
		values.put(LEVEL_ROTATE_21, rotate21);
		values.put(LEVEL_ROTATE_22, rotate22);
		values.put(LEVEL_ROTATE_23, rotate23);
		values.put(LEVEL_ROTATE_24, rotate24);
		values.put(LEVEL_ROTATE_25, rotate25);
		values.put(LEVEL_ROTATE_26, rotate26);
		values.put(LEVEL_ROTATE_27, rotate27);
		values.put(LEVEL_ROTATE_28, rotate28);
		
		values.put(LEVEL_ROTATE_31, rotate31);
		values.put(LEVEL_ROTATE_32, rotate32);
		values.put(LEVEL_ROTATE_33, rotate33);
		values.put(LEVEL_ROTATE_34, rotate34);
		values.put(LEVEL_ROTATE_35, rotate35);
		values.put(LEVEL_ROTATE_36, rotate36);
		values.put(LEVEL_ROTATE_37, rotate37);
		values.put(LEVEL_ROTATE_38, rotate38);
		
		values.put(LEVEL_ROTATE_41, rotate41);
		values.put(LEVEL_ROTATE_42, rotate42);
		values.put(LEVEL_ROTATE_43, rotate43);
		values.put(LEVEL_ROTATE_44, rotate44);
		values.put(LEVEL_ROTATE_45, rotate45);
		values.put(LEVEL_ROTATE_46, rotate46);
		values.put(LEVEL_ROTATE_47, rotate47);
		values.put(LEVEL_ROTATE_48, rotate48);
		
		values.put(LEVEL_ROTATE_51, rotate51);
		values.put(LEVEL_ROTATE_52, rotate52);
		values.put(LEVEL_ROTATE_53, rotate53);
		values.put(LEVEL_ROTATE_54, rotate54);
		values.put(LEVEL_ROTATE_55, rotate55);
		values.put(LEVEL_ROTATE_56, rotate56);
		values.put(LEVEL_ROTATE_57, rotate57);
		values.put(LEVEL_ROTATE_58, rotate58);
		
		values.put(LEVEL_ROTATE_61, rotate61);
		values.put(LEVEL_ROTATE_62, rotate62);
		values.put(LEVEL_ROTATE_63, rotate63);
		values.put(LEVEL_ROTATE_64, rotate64);
		values.put(LEVEL_ROTATE_65, rotate65);
		values.put(LEVEL_ROTATE_66, rotate66);
		values.put(LEVEL_ROTATE_67, rotate67);
		values.put(LEVEL_ROTATE_68, rotate68);
		
		values.put(LEVEL_ROTATE_71, rotate71);
		values.put(LEVEL_ROTATE_72, rotate72);
		values.put(LEVEL_ROTATE_73, rotate73);
		values.put(LEVEL_ROTATE_74, rotate74);
		values.put(LEVEL_ROTATE_75, rotate75);
		values.put(LEVEL_ROTATE_76, rotate76);
		values.put(LEVEL_ROTATE_77, rotate77);
		values.put(LEVEL_ROTATE_78, rotate78);
		
		values.put(LEVEL_ROTATE_81, rotate81);
		values.put(LEVEL_ROTATE_82, rotate82);
		values.put(LEVEL_ROTATE_83, rotate83);
		values.put(LEVEL_ROTATE_84, rotate84);
		values.put(LEVEL_ROTATE_85, rotate85);
		values.put(LEVEL_ROTATE_86, rotate86);
		values.put(LEVEL_ROTATE_87, rotate87);
		values.put(LEVEL_ROTATE_88, rotate88);
		
		values.put(LEVEL_ROTATE_91, rotate91);
		values.put(LEVEL_ROTATE_92, rotate92);
		values.put(LEVEL_ROTATE_93, rotate93);
		values.put(LEVEL_ROTATE_94, rotate94);
		values.put(LEVEL_ROTATE_95, rotate95);
		values.put(LEVEL_ROTATE_96, rotate96);
		values.put(LEVEL_ROTATE_97, rotate97);
		values.put(LEVEL_ROTATE_98, rotate98);
		
		values.put(LEVEL_ROTATE_101, rotate101);
		values.put(LEVEL_ROTATE_102, rotate102);
		values.put(LEVEL_ROTATE_103, rotate103);
		values.put(LEVEL_ROTATE_104, rotate104);
		values.put(LEVEL_ROTATE_105, rotate105);
		values.put(LEVEL_ROTATE_106, rotate106);
		values.put(LEVEL_ROTATE_107, rotate107);
		values.put(LEVEL_ROTATE_108, rotate108);
		
		// ask the database object to insert the new data 
		try{db.insert(TABLE_LEVELS, null, values);
		}
		catch(Exception e)
		{
			Log.e("DB ERROR addlevels:", e.toString());
			e.printStackTrace();
		}
	}
	/***************************************************************************
	 *  GET ROW DATABASE
	 */
	
	
	public int[][] getLevelArray(String levelnr)
	{
		// create an array list to store data from the database row.
		// I would recommend creating a JavaBean compliant object 
		// to store this data instead.  That way you can ensure
		// data types are correct.
		int[][] rowArray = new int[12][10];
		//ArrayList<Object> rowArray = new ArrayList<Object>();
		//rowArray = null;
		Cursor cursor;
 
		try
		{
			// this is a database call that creates a "cursor" object.
			// the cursor object store the information collected from the
			// database and is used to iterate through the data.
			cursor = db.query
			(
					TABLE_LEVELS,
					new String[] { 	LEVEL_11, LEVEL_12, LEVEL_13, LEVEL_14, LEVEL_15, LEVEL_16, LEVEL_17, LEVEL_18,
									LEVEL_21, LEVEL_22, LEVEL_23, LEVEL_24, LEVEL_25, LEVEL_26, LEVEL_27, LEVEL_28,
									LEVEL_31, LEVEL_32, LEVEL_33, LEVEL_34, LEVEL_35, LEVEL_36, LEVEL_37, LEVEL_38,
									LEVEL_41, LEVEL_42, LEVEL_43, LEVEL_44, LEVEL_45, LEVEL_46, LEVEL_47, LEVEL_48,
									LEVEL_51, LEVEL_52, LEVEL_53, LEVEL_54, LEVEL_55, LEVEL_56, LEVEL_57, LEVEL_58,
									LEVEL_61, LEVEL_62, LEVEL_63, LEVEL_64, LEVEL_65, LEVEL_66, LEVEL_67, LEVEL_68,
									LEVEL_71, LEVEL_72, LEVEL_73, LEVEL_74, LEVEL_75, LEVEL_76, LEVEL_77, LEVEL_78,
									LEVEL_81, LEVEL_82, LEVEL_83, LEVEL_84, LEVEL_85, LEVEL_86, LEVEL_87, LEVEL_88,
									LEVEL_91, LEVEL_92, LEVEL_93, LEVEL_94, LEVEL_95, LEVEL_96, LEVEL_97, LEVEL_98,
									LEVEL_101, LEVEL_102, LEVEL_103, LEVEL_104, LEVEL_105, LEVEL_106, LEVEL_107, LEVEL_108
					},
					LEVEL_NR + "= '" + levelnr +"'",
					null, null, null, null,null
			);
			
			// move the pointer to position zero in the cursor.
			cursor.moveToFirst();
 
			// if there is data available after the cursor's pointer, add
			// it to the ArrayList that will be returned by the method.
			if (!cursor.isAfterLast())
			{
				do
				{
					//eerste rij niks
					
					rowArray[1][1] = cursor.getInt(0);
					rowArray[1][2] = cursor.getInt(1);
					rowArray[1][3] = cursor.getInt(2);
					rowArray[1][4] = cursor.getInt(3);
					rowArray[1][5] = cursor.getInt(4);
					rowArray[1][6] = cursor.getInt(5);
					rowArray[1][7] = cursor.getInt(6);
					rowArray[1][8] = cursor.getInt(7);
					
					rowArray[2][1] = cursor.getInt(8);
					rowArray[2][2] = cursor.getInt(9);
					rowArray[2][3] = cursor.getInt(10);
					rowArray[2][4] = cursor.getInt(11);
					rowArray[2][5] = cursor.getInt(12);
					rowArray[2][6] = cursor.getInt(13);
					rowArray[2][7] = cursor.getInt(14);
					rowArray[2][8] = cursor.getInt(15);
					
					rowArray[3][1] = cursor.getInt(16);
					rowArray[3][2] = cursor.getInt(17);
					rowArray[3][3] = cursor.getInt(18);
					rowArray[3][4] = cursor.getInt(19);
					rowArray[3][5] = cursor.getInt(20);
					rowArray[3][6] = cursor.getInt(21);
					rowArray[3][7] = cursor.getInt(22);
					rowArray[3][8] = cursor.getInt(23);
					
					rowArray[4][1] = cursor.getInt(24);
					rowArray[4][2] = cursor.getInt(25);
					rowArray[4][3] = cursor.getInt(26);
					rowArray[4][4] = cursor.getInt(27);
					rowArray[4][5] = cursor.getInt(28);
					rowArray[4][6] = cursor.getInt(29);
					rowArray[4][7] = cursor.getInt(30);
					rowArray[4][8] = cursor.getInt(31);
					
					rowArray[5][1] = cursor.getInt(32);
					rowArray[5][2] = cursor.getInt(33);
					rowArray[5][3] = cursor.getInt(34);
					rowArray[5][4] = cursor.getInt(35);
					rowArray[5][5] = cursor.getInt(36);
					rowArray[5][6] = cursor.getInt(37);
					rowArray[5][7] = cursor.getInt(38);
					rowArray[5][8] = cursor.getInt(39);
					
					rowArray[6][1] = cursor.getInt(40);
					rowArray[6][2] = cursor.getInt(41);
					rowArray[6][3] = cursor.getInt(42);
					rowArray[6][4] = cursor.getInt(43);
					rowArray[6][5] = cursor.getInt(44);
					rowArray[6][6] = cursor.getInt(45);
					rowArray[6][7] = cursor.getInt(46);
					rowArray[6][8] = cursor.getInt(47);
					
					rowArray[7][1] = cursor.getInt(48);
					rowArray[7][2] = cursor.getInt(49);
					rowArray[7][3] = cursor.getInt(50);
					rowArray[7][4] = cursor.getInt(51);
					rowArray[7][5] = cursor.getInt(52);
					rowArray[7][6] = cursor.getInt(53);
					rowArray[7][7] = cursor.getInt(54);
					rowArray[7][8] = cursor.getInt(55);
					
					rowArray[8][1] = cursor.getInt(56);
					rowArray[8][2] = cursor.getInt(57);
					rowArray[8][3] = cursor.getInt(58);
					rowArray[8][4] = cursor.getInt(59);
					rowArray[8][5] = cursor.getInt(60);
					rowArray[8][6] = cursor.getInt(61);
					rowArray[8][7] = cursor.getInt(62);
					rowArray[8][8] = cursor.getInt(63);
					
					rowArray[9][1] = cursor.getInt(64);
					rowArray[9][2] = cursor.getInt(65);
					rowArray[9][3] = cursor.getInt(66);
					rowArray[9][4] = cursor.getInt(67);
					rowArray[9][5] = cursor.getInt(68);
					rowArray[9][6] = cursor.getInt(69);
					rowArray[9][7] = cursor.getInt(70);
					rowArray[9][8] = cursor.getInt(71);
					
					rowArray[10][1] = cursor.getInt(72);
					rowArray[10][2] = cursor.getInt(73);
					rowArray[10][3] = cursor.getInt(74);
					rowArray[10][4] = cursor.getInt(75);
					rowArray[10][5] = cursor.getInt(76);
					rowArray[10][6] = cursor.getInt(77);
					rowArray[10][7] = cursor.getInt(78);
					rowArray[10][8] = cursor.getInt(79);
					
				}
				while (cursor.moveToNext());
			}
 
			// let java know that you are through with the cursor.
			cursor.close();
		}
		catch (SQLException e) 
		{
			Log.e("DB ERROR", e.toString());
			e.printStackTrace();
		}
 
		// return the ArrayList containing the given row from the database.
		return rowArray;
	}
	public int[][] getLevelArrayRotate(String levelnr)
	{
		// create an array list to store data from the database row.
		// I would recommend creating a JavaBean compliant object 
		// to store this data instead.  That way you can ensure
		// data types are correct.
		int[][] rowArray = new int[12][10];
		//ArrayList<Object> rowArray = new ArrayList<Object>();
		//rowArray = null;
		Cursor cursor;
 
		try
		{
			// this is a database call that creates a "cursor" object.
			// the cursor object store the information collected from the
			// database and is used to iterate through the data.
			cursor = db.query
			(
					TABLE_LEVELS,
					new String[] { 	LEVEL_ROTATE_11, LEVEL_ROTATE_12, LEVEL_ROTATE_13, LEVEL_ROTATE_14, LEVEL_ROTATE_15, LEVEL_ROTATE_16, LEVEL_ROTATE_17, LEVEL_ROTATE_18,
									LEVEL_ROTATE_21, LEVEL_ROTATE_22, LEVEL_ROTATE_23, LEVEL_ROTATE_24, LEVEL_ROTATE_25, LEVEL_ROTATE_26, LEVEL_ROTATE_27, LEVEL_ROTATE_28,
									LEVEL_ROTATE_31, LEVEL_ROTATE_32, LEVEL_ROTATE_33, LEVEL_ROTATE_34, LEVEL_ROTATE_35, LEVEL_ROTATE_36, LEVEL_ROTATE_37, LEVEL_ROTATE_38,
									LEVEL_ROTATE_41, LEVEL_ROTATE_42, LEVEL_ROTATE_43, LEVEL_ROTATE_44, LEVEL_ROTATE_45, LEVEL_ROTATE_46, LEVEL_ROTATE_47, LEVEL_ROTATE_48,
									LEVEL_ROTATE_51, LEVEL_ROTATE_52, LEVEL_ROTATE_53, LEVEL_ROTATE_54, LEVEL_ROTATE_55, LEVEL_ROTATE_56, LEVEL_ROTATE_57, LEVEL_ROTATE_58,
									LEVEL_ROTATE_61, LEVEL_ROTATE_62, LEVEL_ROTATE_63, LEVEL_ROTATE_64, LEVEL_ROTATE_65, LEVEL_ROTATE_66, LEVEL_ROTATE_67, LEVEL_ROTATE_68,
									LEVEL_ROTATE_71, LEVEL_ROTATE_72, LEVEL_ROTATE_73, LEVEL_ROTATE_74, LEVEL_ROTATE_75, LEVEL_ROTATE_76, LEVEL_ROTATE_77, LEVEL_ROTATE_78,
									LEVEL_ROTATE_81, LEVEL_ROTATE_82, LEVEL_ROTATE_83, LEVEL_ROTATE_84, LEVEL_ROTATE_85, LEVEL_ROTATE_86, LEVEL_ROTATE_87, LEVEL_ROTATE_88,
									LEVEL_ROTATE_91, LEVEL_ROTATE_92, LEVEL_ROTATE_93, LEVEL_ROTATE_94, LEVEL_ROTATE_95, LEVEL_ROTATE_96, LEVEL_ROTATE_97, LEVEL_ROTATE_98,
									LEVEL_ROTATE_101, LEVEL_ROTATE_102, LEVEL_ROTATE_103, LEVEL_ROTATE_104, LEVEL_ROTATE_105, LEVEL_ROTATE_106, LEVEL_ROTATE_107, LEVEL_ROTATE_108
					},
					LEVEL_NR + "= '" + levelnr + "'",
					null, null, null, null, null
			);
			
			// move the pointer to position zero in the cursor.
			cursor.moveToFirst();
 
			// if there is data available after the cursor's pointer, add
			// it to the ArrayList that will be returned by the method.
			if (!cursor.isAfterLast())
			{
				do
				{
					//eerste rij niks
					
					rowArray[1][1] = cursor.getInt(0);
					rowArray[1][2] = cursor.getInt(1);
					rowArray[1][3] = cursor.getInt(2);
					rowArray[1][4] = cursor.getInt(3);
					rowArray[1][5] = cursor.getInt(4);
					rowArray[1][6] = cursor.getInt(5);
					rowArray[1][7] = cursor.getInt(6);
					rowArray[1][8] = cursor.getInt(7);
					
					rowArray[2][1] = cursor.getInt(8);
					rowArray[2][2] = cursor.getInt(9);
					rowArray[2][3] = cursor.getInt(10);
					rowArray[2][4] = cursor.getInt(11);
					rowArray[2][5] = cursor.getInt(12);
					rowArray[2][6] = cursor.getInt(13);
					rowArray[2][7] = cursor.getInt(14);
					rowArray[2][8] = cursor.getInt(15);
					
					rowArray[3][1] = cursor.getInt(16);
					rowArray[3][2] = cursor.getInt(17);
					rowArray[3][3] = cursor.getInt(18);
					rowArray[3][4] = cursor.getInt(19);
					rowArray[3][5] = cursor.getInt(20);
					rowArray[3][6] = cursor.getInt(21);
					rowArray[3][7] = cursor.getInt(22);
					rowArray[3][8] = cursor.getInt(23);
					
					rowArray[4][1] = cursor.getInt(24);
					rowArray[4][2] = cursor.getInt(25);
					rowArray[4][3] = cursor.getInt(26);
					rowArray[4][4] = cursor.getInt(27);
					rowArray[4][5] = cursor.getInt(28);
					rowArray[4][6] = cursor.getInt(29);
					rowArray[4][7] = cursor.getInt(30);
					rowArray[4][8] = cursor.getInt(31);
					
					rowArray[5][1] = cursor.getInt(32);
					rowArray[5][2] = cursor.getInt(33);
					rowArray[5][3] = cursor.getInt(34);
					rowArray[5][4] = cursor.getInt(35);
					rowArray[5][5] = cursor.getInt(36);
					rowArray[5][6] = cursor.getInt(37);
					rowArray[5][7] = cursor.getInt(38);
					rowArray[5][8] = cursor.getInt(39);
					
					rowArray[6][1] = cursor.getInt(40);
					rowArray[6][2] = cursor.getInt(41);
					rowArray[6][3] = cursor.getInt(42);
					rowArray[6][4] = cursor.getInt(43);
					rowArray[6][5] = cursor.getInt(44);
					rowArray[6][6] = cursor.getInt(45);
					rowArray[6][7] = cursor.getInt(46);
					rowArray[6][8] = cursor.getInt(47);
					
					rowArray[7][1] = cursor.getInt(48);
					rowArray[7][2] = cursor.getInt(49);
					rowArray[7][3] = cursor.getInt(50);
					rowArray[7][4] = cursor.getInt(51);
					rowArray[7][5] = cursor.getInt(52);
					rowArray[7][6] = cursor.getInt(53);
					rowArray[7][7] = cursor.getInt(54);
					rowArray[7][8] = cursor.getInt(55);
					
					rowArray[8][1] = cursor.getInt(56);
					rowArray[8][2] = cursor.getInt(57);
					rowArray[8][3] = cursor.getInt(58);
					rowArray[8][4] = cursor.getInt(59);
					rowArray[8][5] = cursor.getInt(60);
					rowArray[8][6] = cursor.getInt(61);
					rowArray[8][7] = cursor.getInt(62);
					rowArray[8][8] = cursor.getInt(63);
					
					rowArray[9][1] = cursor.getInt(64);
					rowArray[9][2] = cursor.getInt(65);
					rowArray[9][3] = cursor.getInt(66);
					rowArray[9][4] = cursor.getInt(67);
					rowArray[9][5] = cursor.getInt(68);
					rowArray[9][6] = cursor.getInt(69);
					rowArray[9][7] = cursor.getInt(70);
					rowArray[9][8] = cursor.getInt(71);
					
					rowArray[10][1] = cursor.getInt(72);
					rowArray[10][2] = cursor.getInt(73);
					rowArray[10][3] = cursor.getInt(74);
					rowArray[10][4] = cursor.getInt(75);
					rowArray[10][5] = cursor.getInt(76);
					rowArray[10][6] = cursor.getInt(77);
					rowArray[10][7] = cursor.getInt(78);
					rowArray[10][8] = cursor.getInt(79);
					
				}
				while (cursor.moveToNext());
			}
 
			// let java know that you are through with the cursor.
			cursor.close();
		}
		catch (SQLException e) 
		{
			Log.e("DB ERROR", e.toString());
			e.printStackTrace();
		}
 
		// return the ArrayList containing the given row from the database.
		return rowArray;
	}
	
	
	public String[] getAllLevels(int levelpack)
	{
		String[] dataArrays = new String[AANTALLEVELS];
		Cursor cursor;
 
		int count = 0;
		try
		{
			// ask the database object to create the cursor.
			cursor = db.query(
					TABLE_LEVELS,
					new String[] { LEVEL_NR },
					LEVEL_PACK +" = "+ levelpack, 
					null, null, null, null
			);
			cursor.moveToFirst();
			if (!cursor.isAfterLast())
			{
				do
				{
					dataArrays[count] = cursor.getString(0);
					count++;
				}
				// move the cursor's pointer up one position.
				while (cursor.moveToNext());
			}
		}
		catch (SQLException e)
		{
			Log.e("DB Error", e.toString());
			e.printStackTrace();
		}
 
		// return the ArrayList that holds the data collected from
		// the database.
		return dataArrays;
	}
	public int[] getAllTopscores(int levelpack)
	{
		int[] dataArrays = new int[AANTALLEVELS];
		Cursor cursor;
 
		int count = 0;
		try
		{
			// ask the database object to create the cursor.
			cursor = db.query(
					TABLE_LEVELS,
					new String[] { LEVEL_TOPSCORE_SEC },
					LEVEL_PACK +" = "+ levelpack, 
					null, null, null, null
			);
			cursor.moveToFirst();
			if (!cursor.isAfterLast())
			{
				do
				{
					dataArrays[count] = Integer.parseInt( cursor.getString(0) );
					count++;
				}
				// move the cursor's pointer up one position.
				while (cursor.moveToNext());
			}
		}
		catch (SQLException e)
		{
			Log.e("DB Error", e.toString());
			e.printStackTrace();
		}
 
		// return the ArrayList that holds the data collected from
		// the database.
		return dataArrays;
	}
	
	public int getTopscoreSecLevel(String level)
	{
		int dataArrays = 0;
		Cursor cursor;
		try
		{
			// ask the database object to create the cursor.
			cursor = db.query(
					TABLE_LEVELS,
					new String[] { LEVEL_TOPSCORE_SEC },
					LEVEL_NR +" = '"+ level+"'", 
					null, null, null, null
			);
			cursor.moveToFirst();
			if (!cursor.isAfterLast())
			{
				do
				{
					dataArrays = cursor.getInt(0);
				}
				// move the cursor's pointer up one position.
				while (cursor.moveToNext());
			}
		}
		catch (SQLException e)
		{
			Log.e("DB Error", e.toString());
			e.printStackTrace();
		}
		// return the ArrayList that holds the data collected from
		// the database.
		return dataArrays;
	}
	public int getTopscoreKliksLevel(String level)
	{
		int dataArrays = 0;
		Cursor cursor;
		try
		{
			// ask the database object to create the cursor.
			cursor = db.query(
					TABLE_LEVELS,
					new String[] { LEVEL_TOPSCORE_KLIKS },
					LEVEL_NR +" = '"+ level+"'", 
					null, null, null, null
			);
			cursor.moveToFirst();
			if (!cursor.isAfterLast())
			{
				do
				{
					dataArrays = cursor.getInt(0);
				}
				// move the cursor's pointer up one position.
				while (cursor.moveToNext());
			}
		}
		catch (SQLException e)
		{
			Log.e("DB Error", e.toString());
			e.printStackTrace();
		}
		// return the ArrayList that holds the data collected from
		// the database.
		return dataArrays;
	}
	
	//UPDATE TOPSCORES
	public void updateTopScoreSec(String level, int sec )
	{
		// this is a key value pair holder used by android's SQLite functions
		ContentValues values = new ContentValues();
		values.put(LEVEL_TOPSCORE_SEC, sec);
 
		// ask the database object to update the database row of given rowID
		try {db.update(TABLE_LEVELS, values, LEVEL_NR + " = '" + level +"'", null);}
		catch (Exception e)
		{
			Log.e("DB Error updateTOPSCORESEC:", e.toString());
			e.printStackTrace();
		}
	}
	//UPDATE TOPSCORES
	public void updateTopScoreKliks(String level, int kliks )
	{
		// this is a key value pair holder used by android's SQLite functions
		ContentValues values = new ContentValues();
		values.put(LEVEL_TOPSCORE_KLIKS, kliks);
 
		// ask the database object to update the database row of given rowID
		try {db.update(TABLE_LEVELS, values, LEVEL_NR + " = '" + level + "'", null);}
		catch (Exception e)
		{
			Log.e("DB Error updateTOPSCOREKLIKS:", e.toString());
			e.printStackTrace();
		}
	}
	
	
	public String[] getAllLevelPacks(){
		String[] dataArrays = new String[AANTALPACKS];
		Cursor cursor;
 
		int count = 0;
		try
		{
			// ask the database object to create the cursor.
			cursor = db.query(
					TABLE_LEVELPACKS,
					new String[] { LEVELPACK_NAAM},
					
					null, null, null, null, null
			);
			cursor.moveToFirst();
			if (!cursor.isAfterLast())
			{
				do
				{
					dataArrays[count] = cursor.getString(0);
					count++;
				}
				// move the cursor's pointer up one position.
				while (cursor.moveToNext());
			}
		}
		catch (SQLException e)
		{
			Log.e("DB Error", e.toString());
			e.printStackTrace();
		}
 
		// return the ArrayList that holds the data collected from
		// the database.
		return dataArrays;
		
	}
	public void close() {
	    db.close();
	}
	private class CustomSQLiteOpenHelper extends SQLiteOpenHelper
	{
		public CustomSQLiteOpenHelper(Context context)
		{
			super(context, DB_NAME, null, DB_VERSION);
		}
 
		@Override
		public void onCreate(SQLiteDatabase db)
		{
			//create table levelpacks
			String newTableLevelpackQueryString = "create table " + TABLE_LEVELPACKS + " (" +
					LEVELPACK_ID + " integer primary key autoincrement not null, " +
					LEVELPACK_NAAM + " text, " +
					LEVELPACK_PLAATJE + " text" +
					");";
			db.execSQL(newTableLevelpackQueryString);
					
			//CREATE TABLE levels
			String newTableMijnGegevensQueryString = "create table " + TABLE_LEVELS + " (" +
					LEVEL_ID + " integer primary key autoincrement not null, " +
					LEVEL_NR + " text, " +
					LEVEL_PLAATJE + " text, " +
					LEVEL_TOPSCORE_KLIKS + " integer, " +
					LEVEL_TOPSCORE_SEC + " integer, " +
					
					LEVEL_11 + " integer, " +
					LEVEL_12 + " integer, " +
					LEVEL_13 + " integer, " +
					LEVEL_14 + " integer, " +
					LEVEL_15 + " integer, " +
					LEVEL_16 + " integer, " +
					LEVEL_17 + " integer, " +
					LEVEL_18 + " integer, " +
					
					LEVEL_21 + " integer, " +
					LEVEL_22 + " integer, " +
					LEVEL_23 + " integer, " +
					LEVEL_24 + " integer, " +
					LEVEL_25 + " integer, " +
					LEVEL_26 + " integer, " +
					LEVEL_27 + " integer, " +
					LEVEL_28 + " integer, " +
					
					LEVEL_31 + " integer, " +
					LEVEL_32 + " integer, " +
					LEVEL_33 + " integer, " +
					LEVEL_34 + " integer, " +
					LEVEL_35 + " integer, " +
					LEVEL_36 + " integer, " +
					LEVEL_37 + " integer, " +
					LEVEL_38 + " integer, " +
					
					LEVEL_41 + " integer, " +
					LEVEL_42 + " integer, " +
					LEVEL_43 + " integer, " +
					LEVEL_44 + " integer, " +
					LEVEL_45 + " integer, " +
					LEVEL_46 + " integer, " +
					LEVEL_47 + " integer, " +
					LEVEL_48 + " integer, " +
													
					LEVEL_51 + " integer, " +
					LEVEL_52 + " integer, " +
					LEVEL_53 + " integer, " +
					LEVEL_54 + " integer, " +
					LEVEL_55 + " integer, " +
					LEVEL_56 + " integer, " +
					LEVEL_57 + " integer, " +
					LEVEL_58 + " integer, " +
					
					LEVEL_61 + " integer, " +
					LEVEL_62 + " integer, " +
					LEVEL_63 + " integer, " +
					LEVEL_64 + " integer, " +
					LEVEL_65 + " integer, " +
					LEVEL_66 + " integer, " +
					LEVEL_67 + " integer, " +
					LEVEL_68 + " integer, " +
					
					LEVEL_71 + " integer, " +
					LEVEL_72 + " integer, " +
					LEVEL_73 + " integer, " +
					LEVEL_74 + " integer, " +
					LEVEL_75 + " integer, " +
					LEVEL_76 + " integer, " +
					LEVEL_77 + " integer, " +
					LEVEL_78 + " integer, " +
					
					LEVEL_81 + " integer, " +
					LEVEL_82 + " integer, " +
					LEVEL_83 + " integer, " +
					LEVEL_84 + " integer, " +
					LEVEL_85 + " integer, " +
					LEVEL_86 + " integer, " +
					LEVEL_87 + " integer, " +
					LEVEL_88 + " integer, " +
					
					LEVEL_91 + " integer, " +
					LEVEL_92 + " integer, " +
					LEVEL_93 + " integer, " +
					LEVEL_94 + " integer, " +
					LEVEL_95 + " integer, " +
					LEVEL_96 + " integer, " +
					LEVEL_97 + " integer, " +
					LEVEL_98 + " integer, " +
					
					LEVEL_101 + " integer, " +
					LEVEL_102 + " integer, " +
					LEVEL_103 + " integer, " +
					LEVEL_104 + " integer, " +
					LEVEL_105 + " integer, " +
					LEVEL_106 + " integer, " +
					LEVEL_107 + " integer, " +
					LEVEL_108 + " integer, " + 
					
					LEVEL_ROTATE_11 + " integer, " +
					LEVEL_ROTATE_12 + " integer, " +
					LEVEL_ROTATE_13 + " integer, " +
					LEVEL_ROTATE_14 + " integer, " +
					LEVEL_ROTATE_15 + " integer, " +
					LEVEL_ROTATE_16 + " integer, " +
					LEVEL_ROTATE_17 + " integer, " +
					LEVEL_ROTATE_18 + " integer, " +
					
					LEVEL_ROTATE_21 + " integer, " +
					LEVEL_ROTATE_22 + " integer, " +
					LEVEL_ROTATE_23 + " integer, " +
					LEVEL_ROTATE_24 + " integer, " +
					LEVEL_ROTATE_25 + " integer, " +
					LEVEL_ROTATE_26 + " integer, " +
					LEVEL_ROTATE_27 + " integer, " +
					LEVEL_ROTATE_28 + " integer, " +
					
					LEVEL_ROTATE_31 + " integer, " +
					LEVEL_ROTATE_32 + " integer, " +
					LEVEL_ROTATE_33 + " integer, " +
					LEVEL_ROTATE_34 + " integer, " +
					LEVEL_ROTATE_35 + " integer, " +
					LEVEL_ROTATE_36 + " integer, " +
					LEVEL_ROTATE_37 + " integer, " +
					LEVEL_ROTATE_38 + " integer, " +
					
					LEVEL_ROTATE_41 + " integer, " +
					LEVEL_ROTATE_42 + " integer, " +
					LEVEL_ROTATE_43 + " integer, " +
					LEVEL_ROTATE_44 + " integer, " +
					LEVEL_ROTATE_45 + " integer, " +
					LEVEL_ROTATE_46 + " integer, " +
					LEVEL_ROTATE_47 + " integer, " +
					LEVEL_ROTATE_48 + " integer, " +
													
					LEVEL_ROTATE_51 + " integer, " +
					LEVEL_ROTATE_52 + " integer, " +
					LEVEL_ROTATE_53 + " integer, " +
					LEVEL_ROTATE_54 + " integer, " +
					LEVEL_ROTATE_55 + " integer, " +
					LEVEL_ROTATE_56 + " integer, " +
					LEVEL_ROTATE_57 + " integer, " +
					LEVEL_ROTATE_58 + " integer, " +
					
					LEVEL_ROTATE_61 + " integer, " +
					LEVEL_ROTATE_62 + " integer, " +
					LEVEL_ROTATE_63 + " integer, " +
					LEVEL_ROTATE_64 + " integer, " +
					LEVEL_ROTATE_65 + " integer, " +
					LEVEL_ROTATE_66 + " integer, " +
					LEVEL_ROTATE_67 + " integer, " +
					LEVEL_ROTATE_68 + " integer, " +
					
					LEVEL_ROTATE_71 + " integer, " +
					LEVEL_ROTATE_72 + " integer, " +
					LEVEL_ROTATE_73 + " integer, " +
					LEVEL_ROTATE_74 + " integer, " +
					LEVEL_ROTATE_75 + " integer, " +
					LEVEL_ROTATE_76 + " integer, " +
					LEVEL_ROTATE_77 + " integer, " +
					LEVEL_ROTATE_78 + " integer, " +
					
					LEVEL_ROTATE_81 + " integer, " +
					LEVEL_ROTATE_82 + " integer, " +
					LEVEL_ROTATE_83 + " integer, " +
					LEVEL_ROTATE_84 + " integer, " +
					LEVEL_ROTATE_85 + " integer, " +
					LEVEL_ROTATE_86 + " integer, " +
					LEVEL_ROTATE_87 + " integer, " +
					LEVEL_ROTATE_88 + " integer, " +
					
					LEVEL_ROTATE_91 + " integer, " +
					LEVEL_ROTATE_92 + " integer, " +
					LEVEL_ROTATE_93 + " integer, " +
					LEVEL_ROTATE_94 + " integer, " +
					LEVEL_ROTATE_95 + " integer, " +
					LEVEL_ROTATE_96 + " integer, " +
					LEVEL_ROTATE_97 + " integer, " +
					LEVEL_ROTATE_98 + " integer, " +
					
					LEVEL_ROTATE_101 + " integer, " +
					LEVEL_ROTATE_102 + " integer, " +
					LEVEL_ROTATE_103 + " integer, " +
					LEVEL_ROTATE_104 + " integer, " +
					LEVEL_ROTATE_105 + " integer, " +
					LEVEL_ROTATE_106 + " integer, " +
					LEVEL_ROTATE_107 + " integer, " +
					LEVEL_ROTATE_108 + " integer, " + 
					
					LEVEL_PACK + " integer," +
					"FOREIGN KEY (" + LEVEL_PACK + ") REFERENCES "+ TABLE_LEVELPACKS + "(" + LEVELPACK_ID + ") " +
					");";
			db.execSQL(newTableMijnGegevensQueryString);
		}
 
		@Override
		public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion)
		{
			// NOTHING TO DO HERE. THIS IS THE ORIGINAL DATABASE VERSION.
			// OTHERWISE, YOU WOULD SPECIFIY HOW TO UPGRADE THE DATABASE.
		}
	
	}
}
